Conversation
…s and implement a standalone, thread-safe scheduling system
…ses and entity management
…irs with optional expiration
…Collector, and TickProfiler
…anager, DebugPrinter, DebugScope, and Tracer classes
…ope, and related classes
…yWatcher, FileCache, and FileService
…yWatcher, FileCache, and FileService
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive "dev" environment with significant additions to the plugin framework, including new UI systems, database management, performance monitoring, and plugin integrations. The changes primarily focus on adding modern development tooling and architectural patterns to the existing NextForge framework.
Key changes include:
- Complete UI system with inventory management, layouts, and support components
- Performance monitoring and profiling infrastructure
- Database abstraction layer with support for multiple database types (SQL, MongoDB, Redis)
- Plugin bridge system for third-party integrations (Vault, PlaceholderAPI, LuckPerms)
Reviewed Changes
Copilot reviewed 92 out of 94 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin.yml | Added Vault as soft dependency |
| ChatPagination.java | Removed legacy chat pagination utility |
| NextForgePlugin.java | Integrated new UI and database managers, performance monitoring |
| Multiple UI files | Complete UI framework with components, layouts, inventory management |
| Multiple database files | Database abstraction layer with repository patterns |
| Multiple performance files | Performance monitoring and profiling system |
| Multiple bridge files | Plugin integration framework |
Comments suppressed due to low confidence (2)
src/main/java/gg/nextforge/performance/TickListener.java:1
- The package declaration 'gg.nextforge.performance.listener' does not match the file location. The file is in 'src/main/java/gg/nextforge/performance/' but the package suggests it should be in a 'listener' subdirectory.
package gg.nextforge.performance.listener;
src/main/java/gg/nextforge/bridge/impl/LuckPermsBridge.java:1
- The package declaration should be 'gg.nextforge.bridge.impl' to match the file location, not 'gg.nextforge.bridge'.
package gg.nextforge.bridge;
| InventoryCloseEvent.getHandlerList().unregister(this); | ||
| } | ||
| } | ||
| }, plugin); |
There was a problem hiding this comment.
Calling unregister(this) on the handler list will not work as expected because 'this' refers to the anonymous listener, not a registered handler. This could cause memory leaks as the event handler may not be properly unregistered.
| InventoryCloseEvent.getHandlerList().unregister(this); | |
| } | |
| } | |
| }, plugin); | |
| InventoryCloseEvent.getHandlerList().unregister(listener); | |
| } | |
| } | |
| }; | |
| Bukkit.getPluginManager().registerEvents(listener, plugin); |
| @org.bukkit.event.EventHandler | ||
| public void onSwitch(PlayerItemHeldEvent event) { | ||
| // Optional: clear hotbar on slot switch if desired | ||
| } | ||
|
|
There was a problem hiding this comment.
[nitpick] The onSwitch method is empty and only contains a comment. Consider either implementing the functionality or removing the empty method to reduce code clutter.
| @org.bukkit.event.EventHandler | |
| public void onSwitch(PlayerItemHeldEvent event) { | |
| // Optional: clear hotbar on slot switch if desired | |
| } |
| sqlConnection = DriverManager.getConnection(connectionString); | ||
| break; | ||
| case MONGODB: | ||
| String uri = (connectionString); |
There was a problem hiding this comment.
The parentheses around 'connectionString' are unnecessary and should be removed for cleaner code.
| String uri = (connectionString); | |
| String uri = connectionString; |
| @@ -0,0 +1,27 @@ | |||
| package gg.nextforge.performance; | |||
|
|
|||
| import gg.nextforge.performance.listener.TickListener; | |||
There was a problem hiding this comment.
The import path 'gg.nextforge.performance.listener.TickListener' is incorrect. Based on the file structure, it should be 'gg.nextforge.performance.TickListener' since TickListener.java is directly in the performance package.
| import gg.nextforge.performance.listener.TickListener; | |
| import gg.nextforge.performance.TickListener; |
| activeTasks.put(id, scheduled); | ||
| return scheduled; | ||
| private long ticksToMillis(long ticks) { | ||
| return ticks * 50L; // 20 ticks = 1 second |
There was a problem hiding this comment.
The conversion factor should be a named constant instead of a magic number. Consider defining 'private static final long MILLIS_PER_TICK = 50L;' for better maintainability.
| return ticks * 50L; // 20 ticks = 1 second | |
| return ticks * MILLIS_PER_TICK; // 20 ticks = 1 second |
No description provided.